package com.example.demo.web;

import com.example.demo.service.TestFeignClient;
import com.example.demo.utils.JacksonUtil;
import com.example.demo.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {

    @Autowired
    private TestFeignClient testFeignClient;

    @RequestMapping("/send")
    public ResponseResult send(String msg){
        ResponseResult responseResult = testFeignClient.sendMsg(msg);
        System.out.println(JacksonUtil.bean2Json(responseResult));
        return responseResult;
    }

}
